package working;
// Operating Systems, Spring 2012

/**
   The OperatingSystem interface defines the characteristics of an operating
   system that are accessible to the hardware.

   The interface below describes the operating system in terms of a single
   method, the interrupt-handler method.  However, the hardware also expects
   any class implementing the OperatingSystem interface to also have a
   constructor accepting a single parameter of type Hardware:

     <blockquote><pre>
       class OS
       implements OperatingSystem {

         // blah blah blah

         OS(Hardware hw) {
	   // blah blah blah
           }

	 // blah blah blah

         void interrupt(Hardware.Interrupt it) {
	   // blah blah blah
	   }

	 // blah blah blah

         }
     </pre></blockquote>

   The instance passed in as a parameter to the constructor is the instance of
   the hardware on which the operating system is running.
 */


interface OperatingSystem {

  /**
     The system calls defined by the operating system.

   */

  final static class SystemCall {
    static final int
      exec    =  2,
      exit    =  3,
      getSlot =  4,
      putSlot =  6,
      yield   = 11;
    }


  /**
     Notify the operating system an interrupt has been raised.

     @param it The raised interrupt's type.
   */

  void interrupt(Hardware.Interrupt it);
  }


// $Log: OperatingSystem.java,v $
// Revision 1.2  2012/02/13 00:45:26  rclayton
// Assign the correct values to system-calls.
//
// Revision 1.1  2012/02/12 20:37:33  rclayton
// Initial revision
//
